from multiprocessing import Process, Pool
import os
import time
def run_proc(wTime):
	n = 0
	while n < 3:
		print("subProcess %s run," % os.getpid(), "{0}".format(time.ctime()))	#获取当前进程号和正在运行是的时间
		time.sleep(wTime)	#等待（休眠）
		n += 1
if __name__ == "__main__":
	p = Process(target=run_proc, args=(2,))  #申请子进程
	p.start()	 #运行进程
	print("Parent process run. subProcess is ", p.pid)
	print("Parent process end,{0}".format(time.ctime()))